package 第六周;

import java.util.Scanner;

public class bank {
    private String accountNumber;
    private double balance;
    private String password;
    private static double minBalance = 0.0;
    private static double interestRate = 1.73;



    public  bank( String password) {
        this.accountNumber = generateAccountNumber();
        this.balance = 0.0;
        this.password = password;
    }


    public static String generateAccountNumber() {
        int a = 10000000+(int)(Math.random()*1000000);
        String accountNumber = Integer.toString(a);
        return accountNumber;
    }
    public String getAccountNumber() {
        return accountNumber;
    }

    public double getBalance() {
        return balance;
    }

    public void setBalance(double balance) {
        this.balance = balance;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public double getMinBalance() {
        return minBalance;
    }

    public void setMinBalance(double minBalance) {
        this.minBalance = minBalance;
    }

    public double getInterestRate() {
        return interestRate;
    }

    public void setInterestRate(double interestRate) {
        this.interestRate = interestRate;
    }

    @Override
    public String toString() {
        return "BankAccount{" +
                "accountNumber='" + accountNumber + '\'' +
                ", balance=" + balance +
                ", password='" + password + '\'' +
                '}'+minBalance+interestRate;
    }
}